package C10_14_ReplaceErrorCodeWithException.after_refactor_2受控异常;

public class Account {
    private int _balance;
    void withdraw(int amount) throws BalanceException{
        if (amount > _balance)
            throw new BalanceException();
        _balance -= amount;
    }
}
